import 'package:json_annotation/json_annotation.dart';

part 'account_detail.g.dart';

@JsonSerializable()
class AccountDetail {
  final int id;
  final String accountTypeName;
  final String amount;
  final String balanceAfterChanged;
  final String notArrivedAmount;
  final String notArrivedBalanceAfterChanged;
  final String operationTypeName;
  final String changeOrigin;
  final String description;
  final bool changeEnd;
  final String changeTime;
  final String createTime;

  AccountDetail(
    this.id,
    this.accountTypeName,
    this.amount,
    this.balanceAfterChanged,
    this.notArrivedAmount,
    this.notArrivedBalanceAfterChanged,
    this.operationTypeName,
    this.changeOrigin,
    this.description,
    this.changeEnd,
    this.changeTime,
    this.createTime,
  );

  factory AccountDetail.fromJson(Map<String, dynamic> json) => _$AccountDetailFromJson(json);

  Map<String, dynamic> toJson() => _$AccountDetailToJson(this);
}
